export default {
  data() {
    return {
      filterTagShow: false,
      filterTagHeight: 40,
      realTimeClientHeight: null
    };
  },
  computed: {
    setTableHeight() {
      const tableOutsideHeight = this.tableOutsideHeight || 188;
      const outsideHeight = this.filterTagShow ? tableOutsideHeight + this.filterTagHeight : tableOutsideHeight;
      !this.realTimeClientHeight && this.setRealTimeClientHeight();
      return (this.realTimeClientHeight - outsideHeight) + '';
    }
  },
  mounted() {
    window.addEventListener('resize', this.setRealTimeClientHeight);
  },
  methods: {
    filterTagStatus(status) {
      this.filterTagShow = status;
    },
    setRealTimeClientHeight() {
      this.realTimeClientHeight = document.documentElement.clientHeight;
    }
  }
};
